package com.carolouvindam.Model;

public class Address {
    private Integer dbId;
    private String Line1;
    private String Line2;
    private String City;
    private String PostalCode;


    public Address(String line1, String line2, String city, String postalCode) {
        Line1 = line1;
        Line2 = line2;
        City = city;
        PostalCode = postalCode;
    }

    public String getPostalCode() {
        return PostalCode;
    }

    public void setPostalCode(String postalCode) {
        PostalCode = postalCode;
    }

    public Integer getDbId() {
        return dbId;
    }

    public void setDbId(Integer dbId) {
        this.dbId = dbId;
    }

    public String getLine1() {
        return Line1;
    }

    public void setLine1(String line1) {
        Line1 = line1;
    }

    public String getLine2() {
        return Line2;
    }

    public void setLine2(String line2) {
        Line2 = line2;
    }

    public String getCity() {
        return City;
    }

    public void setCity(String city) {
        City = city;
    }

    public String toUriComponent() {

        return toString().replace(' ', '+');
    }

    @Override
    public String toString() {
        return (Line1 + ", " + Line2 + ", " + City + " " + PostalCode.toString());
    }
}
